package com.atguigu.eduservice.service;

import com.atguigu.commonutils.ClientEntity.ClientCourse;
import com.atguigu.commonutils.R;
import com.atguigu.eduservice.entity.EduCourse;
import com.atguigu.eduservice.entity.vo.CourseInfoVo;
import com.atguigu.eduservice.entity.vo.CoursePublishVo;
import com.atguigu.eduservice.entity.vo.CourseQuery;
import com.atguigu.eduservice.entity.vo.CourseQueryVo;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author huangqicai
 * @since 2022-10-21
 */
public interface EduCourseService extends IService<EduCourse> {


    /*根据课程id查询课程基本信息*/
    CourseInfoVo getCourseInfo(String courseId);

    /*修改课程基本信息*/
    void updateCourseInfo(CourseInfoVo courseInfoVo);

    /*查询最终发布的课程信息*/
    CoursePublishVo getPublishCourseInfo(String id);

    /*点击发布课程按钮执行的方法*/
    boolean publishCourse(String id);

    /*根据课程id删除课程*/
    boolean deleteCourse(String courseId);

    /*查询课程集合*/
    List<EduCourse> selectCourse();

    /*点击保存并下一步执行的方法*/
    R addCourseInfo(CourseInfoVo courseInfoVo);

    /*条件分页查询课程基本信息*/
    R pageCourse(long current, long limit, CourseQuery courseQuery);

    /*条件分页查询课程信息*/
    R selectPageCourse(long current, long limit, CourseQueryVo courseQueryVo);

    /*前台：获取课程的二级分类*/
    R list2();

    /*前台：根据课程id查询课程的详细信息*/
    R selectCourseVo(String courseId, HttpServletRequest request);

    /*根据课程id获取课程信息*/
    ClientCourse getCourseInfoClient(String courseId);
}
